# Generated by Django 4.0.4 on 2022-05-26 18:53

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Author',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100, verbose_name='Имя')),
                ('description', models.TextField(verbose_name='Описание')),
                ('image', models.ImageField(upload_to='%Y/%m/%d/')),
                ('slug', models.SlugField(verbose_name='URL')),
            ],
            options={
                'verbose_name': 'Автор',
                'verbose_name_plural': 'Авторы',
            },
        ),
        migrations.CreateModel(
            name='Book',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=100, verbose_name='Книга')),
                ('description', models.TextField(verbose_name='Описание')),
                ('content', models.TextField(verbose_name='Содержание')),
                ('added', models.DateTimeField(auto_now_add=True, verbose_name='Добавлена')),
                ('is_read', models.BooleanField(default=False, verbose_name='Прочитана')),
                ('is_defer', models.BooleanField(default=False, verbose_name='Отложена')),
                ('is_favorites', models.BooleanField(default=False, verbose_name='Избранная')),
                ('bookmark', models.PositiveIntegerField(verbose_name='Закладка')),
                ('image', models.ImageField(upload_to='%Y/%m/%d')),
                ('volume', models.PositiveIntegerField(verbose_name='Объем книги')),
                ('slug', models.SlugField(verbose_name='URL')),
                ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='main.author', verbose_name='Автор')),
            ],
            options={
                'verbose_name': 'Книга',
                'verbose_name_plural': 'Книги',
            },
        ),
        migrations.CreateModel(
            name='Group',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=100, verbose_name='Название')),
                ('description', models.TextField(verbose_name='Описание')),
                ('image', models.ImageField(upload_to='%Y/%m/%d/')),
                ('slug', models.SlugField(verbose_name='URL')),
            ],
            options={
                'verbose_name': 'Группа',
                'verbose_name_plural': 'Группы',
            },
        ),
        migrations.CreateModel(
            name='Quote',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('content', models.TextField(verbose_name='Цитата')),
                ('book', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='main.book', verbose_name='Книга')),
            ],
            options={
                'verbose_name': 'Цитата',
                'verbose_name_plural': 'Цитаты',
            },
        ),
        migrations.AddField(
            model_name='book',
            name='group',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='main.group', verbose_name='Группа'),
        ),
    ]
